import { observable, action } from 'mobx'
import FN from '../tools/fn'

export default class ArticleList {
@observable page = 0;
@observable list = [];
@observable hasMore=true;
@observable scrollPos=0;
@action.bound
push(ArrayList){
    if(!this.list.length){
        ArrayList.forEach((item)=>{
            this.list.push(item);
        })
        
        return;
    }
    this.list=this.list.concat(ArrayList);
}

@action.bound
noData(ArrayList){
    this.hasMore=false;
}

@action.bound
pageInCrease(ArrayList){
    this.page++;
}
@action.bound
savePos(ArrayList){
    console.log("document.querySelector(".scrollFixed").scrollTop:",document.querySelector(".scrollFixed").scrollTop)
    this.scrollPos=document.querySelector(".scrollFixed").scrollTop;
}

  constructor() {}
}
